/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Casting;

/**
 *
 * @author c0220909
 */
public class Principal {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Dog d = new Dog();
        Animal a1 = d; // upcast ok with no explicit cast
        Animal a2 = (Animal) d; // upcast ok with an explicit cast
    }
}
